Next | Prev | Up | Top | Contents | Index

Selecting a Major Number

You must select a major number to stand for your driver. The numbers that already exist are listed in sys/major.h. However, the major number should not be coded into the driver. Typically the driver code does not need to know its major number, and if it does, the driver should discover its major number dynamically. A method of doing this is discussed under "Variables Section".

A driver is associated with its major number in the master.d configuration file. When the driver discovers this number dynamically, the system administrator is free to change major numbers in /var/sysgen/master.d files to correct conflicts between one product and another.

It is possible to let the lboot command choose a major number dynamically. This is discussed under "Configuring for a Dynamic Major Number".


Next | Prev | Up | Top | Contents | Index